package com.example.qa_back.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * @author 董帅
 * @date 2021/3/7 - 19:44
 */
@Configuration
public class WebMVCConfig extends WebMvcConfigurationSupport {
    @Override
    protected void addResourceHandlers(ResourceHandlerRegistry registry) {
        /*
        * 功能：配置静态资源
        * url:http://47.95.195.192:8091/static/QA.xlsx
        * */
        registry.addResourceHandler("/static/**").addResourceLocations("file:F:/q_a/file/");
    }
}
